package com.zhangshuo.patternDesign.state;

/**
 * Created by shuo.zhang on 2017-11-03.
 */
public class Person {

    private IState state = COMMON ;

    public static final IState COMMON = new CommonState();
    public static final IState HEALTH = new HealthState();
    public static final IState SICK = new SickState();




    public IState getState() {
        return state;
    }

    public void setState(IState state) {
        this.state = state;
    }

    public void run() throws InterruptedException {
        this.state.run(this);
    }

}
